<extend name="Base/common" />
<block name="body">
    <div class="span9 page_message">
        <section id="contents">
            <include file="Addons/_nav" />
            <div class="table-bar">
                <div class="fl">
                    <empty name="model.extend">
                        <div class="tools">
                            <a class="btn" href="{:U('attradd','gid='.$gid)}">新增属性</a>
                            <button class="btn ajax-post confirm" target-form="ids" url="{:U('attrdel')}">删除属性</button>
                        </div>
                    </empty>
                </div>
            </div>

            <!-- 数据列表 -->
            <div class="data-table">
                <div class="table-striped">
                    <table cellpadding="0" cellspacing="1">
                        <!-- 表头 -->
                        <thead>
                        <tr>
                            <th class="row-selected row-selected"> <input class="regular-checkbox check-all" id="checkAll" type="checkbox"><label for="checkAll"></label></th>
                            <th>属性名</th>
                            <th>属性值</th>
                            <th>价格变动</th>
                            <th>图片</th>
                            <th>操作</th>
                        </tr>
                        </thead>

                        <!-- 列表 -->
                        <tbody>
                        <volist name="list_data" id="data">
                            <tr>
                                <td><input class="regular-checkbox ids" type="checkbox" value="{$data['id']}" id="ids_{$data['id']}" name="ids[]"><label for="ids_{$data['id']}"></label></td>
                                <td>{$data.name}</td>
                                <td>{$data.value}</td>
                                <td>￥<notempty name="data.price">{$data.price}<else />0.00</notempty>元</td>
                                <td><notempty name="data.icon"><img src="{$data.icon}" width="30" height="30" /></notempty></td>
                                <td>
                                    <a href="{:U('attredit','id='.$data['id'])}">编辑</a>&nbsp;&nbsp;
                                    <a href="{:U('attrdel','ids='.$data['id'])}">删除</a>
                                </td>
                            </tr>
                        </volist>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="page"> {$_page|default=''} </div>
        </section>
    </div>
</block>
<block name="script">
    <script type="text/javascript">

    </script>
</block>
